<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>订单详情</title>
  <%--静态包含头部信息--%>
  <%@include file="/pages/common/header.jsp" %>
  <style type="text/css">
    h1 {
      text-align: center;
      margin-top: 200px;
    }
  </style>
</head>
<body>

<div id="header">
  <img class="logo_img" alt="" src="static/img/logo.gif" >
  <span class="wel_word">订单详情页</span>
</div>

<div id="main">

  <table>
    <tr>
      <td>订单号</td>
      <td>书本名称</td>
      <td>书本数量</td>
      <td>书本价格</td>
      <td>总价格</td>
    </tr>
    <c:forEach items="${requestScope.orderItems}" var="orderItem">
      <tr>
        <td>${orderItem.order_id}</td>
        <td>${orderItem.name}</td>
        <td>${orderItem.count}</td>
        <td>${orderItem.price}</td>
        <td>${orderItem.total_price}</td>
      </tr>
    </c:forEach>
    <tr>
      <c:if test="${not empty requestScope.isclient}">
        <td colspan="5"><a href="client/orderServlet?action=showMyOrders&userId=${sessionScope.user.id}">返回</a></td>
      </c:if>
      <c:if test="${empty requestScope.isclient}">
        <td colspan="5"><a href="manager/orderServlet?action=showAllOrders">返回</a></td>
      </c:if>
    </tr>
  </table>
</div>

<%--静态包含页脚信息--%>
<%@include file="/pages/common/footer.jsp" %>
</body>
</html>